﻿using SDDP;
using System;
using System.Collections.Generic;
using System.Text;

namespace DotNetStar.TheKing.Domain
{
    using Infrastructure;
    public class UserOperationEvent:Event
    {
        public UserOperationEvent(UserOperations operationType, string objectId, long userId, string remark=null)
        {
            this.OperationType = operationType;
            this.ObjectId = objectId ?? throw new ArgumentNullException(nameof(objectId));
            this.UserId = userId;
            this.Remark = remark ?? operationType.GetDescription();
        }

        public UserOperations OperationType { get;  }
        public string ObjectId { get;  }
        public long UserId { get;  }
        public string Remark { get; }
    }
}
